package com.ny.demo529;

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class TestMap {
    public static void main(String[] args) {
        Map<Integer,String> map = new HashMap();
        map.put(1,"张三");
        map.put(2,"李四");
        map.put(3,"王五");

        System.out.println(map.get(1));
        Scanner  scanner = new Scanner(System.in);
        for (Integer key:map.keySet()){
            System.out.println(key+"-->"+map.get(key));
        }
        System.out.println(map);
        map.put(1,"赵六");
        System.out.println(map);
    }
}
